package com.chookss.tools;

import com.chookss.mine.entity.MyViedeoEntity;
import com.chookss.mine.entity.RecommendVedioEmployeeEntity;
import com.chookss.video.entity.VideoEntity;

/**
 * Company:
 * Project:
 * Author: liuhaoge
 * Date: 2021/1/27 9:01
 * Note:
 */
public class VedioClassUtils {
    public static VideoEntity modelA2B(MyViedeoEntity.VideoListBean item) {
        try {
            VideoEntity video = new VideoEntity();
            video.id = item.getId();
            video.companyCode = item.getCompanyCode();
            video.employeeCode = item.getEmployeeCode();
            video.employeeName = item.getEmployeeName();
            video.employeeId = item.getEmployeeId();
            video.headPhotoUrl = item.getHeadPhotoUrl();
            video.headPhotoThumbUrl = item.getHeadPhotoThumbUrl();
            video.videoTitle = item.getVideoTitle();
            video.videoId = item.getVideoId();
            video.videoCoverPath = item.getVideoCoverPath();
            video.videoCollectionsCode = item.getVideoCollectionsCode();
            video.videoCollectionsName = item.getVideoCollectionsName();
            video.videoLikeCounts = item.getVideoLikeCounts();
            video.videoShareCounts = item.getVideoShareCounts();
            video.videoCollectCounts = item.getVideoCollectCounts();
            video.videoCommentCounts = item.getVideoCommentCounts();
            video.catalogCodes = item.getCompanyCode();
            video.catalogNames = item.getCatalogNames();
            video.isLike = item.getIsLike();
            video.isCollect = item.getIsCollect();
            video.videoPlayCounts = "0";
            return video;
        } catch (Exception e) {
            return null;
        }
    }
    public static VideoEntity modelA2RecommendVedioEmployeeEntity(RecommendVedioEmployeeEntity item) {
        try {
            VideoEntity video = new VideoEntity();
            video.id = item.getId();
            video.companyCode = item.getCompanyCode();
            video.employeeCode = item.getEmployeeCode();
            video.employeeName = item.getEmployeeName();
            video.employeeId = item.getEmployeeId();
            video.headPhotoUrl = item.getHeadPhotoUrl();
            video.headPhotoThumbUrl = item.getHeadPhotoThumbUrl();
            video.videoTitle = item.getVideoTitle();
            video.videoId = item.getVideoId();
            video.videoCoverPath = item.getVideoCoverPath();
            video.videoCollectionsCode = item.getVideoCollectionsCode();
            video.videoCollectionsName = item.getVideoCollectionsName();
            video.videoLikeCounts = item.getVideoLikeCounts();
            video.videoShareCounts = item.getVideoShareCounts();
            video.videoCollectCounts = item.getVideoCollectCounts();
            video.videoCommentCounts = item.getVideoCommentCounts();
            video.catalogCodes = item.getCompanyCode();
            video.catalogNames = item.getCatalogNames();
            video.isLike = item.getIsLike();
            video.isCollect = item.getIsCollect();
            video.videoPlayCounts ="0";
            return video;
        } catch (Exception e) {
            return null;
        }
    }
}
